package com.richard.base.route

import com.alibaba.android.arouter.launcher.ARouter

/**
 ***************************************
 * 项目名称:Giggle
 * @Author wuzhiguo
 * 邮箱：wuzhiguo@ksjgs.com
 * 创建时间: 2020/7/14     4:43 PM
 * 用途:
 ***************************************
 */

class KsRouter private constructor() {
    private object KsRouterSingletonHolder {
        val KS_ROUTER_INSTANCE = KsRouter()
    }

    fun build(path: String?): KsPostcard {
        return KsPostcard(path)
    }

    companion object {
        val instance: KsRouter
            get() = KsRouterSingletonHolder.KS_ROUTER_INSTANCE

        /**
         * 第三方的router
         *
         * @return 第三方路由
         */
        val thirdRouter: ARouter
            get() = ARouter.getInstance()
    }
}
